﻿using System;
using System.Collections.Generic;
using System.Text;
using MindFactorial.LaunchPoint.Common;

namespace MindFactorial.LaunchPoint.Console.Library
{
    /// <summary>
    /// Represents a decorator to define objects as loaded controllers
    /// for a given console plugin
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class PluginControllerAttribute : Attribute, INamedObject<string>
    {
        string _name;

        /// <summary>
        /// Signifies the decorated object as a controller with the given name.  This name MUST 
        /// be unique
        /// </summary>
        /// <param name="name"></param>
        public PluginControllerAttribute(string name)
        {
            this._name = name;
        }


        /// <summary>
        /// gets the name of the controller (must be unique)
        /// </summary>
        public string Name
        {
            get
            {
                return _name;
            }            
          
        }

      
    }
}
